<!DOCTYPE html>



  


<html class="theme-next pisces use-motion" lang="">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/blog/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/blog/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/blog/css/main.css?v=5.1.4" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/blog/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/blog/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/blog/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/blog/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="Hexo, NexT" />










<meta name="description" content="主页面设置12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010">
<meta name="keywords" content="Android、iOS、Web、React Native">
<meta property="og:type" content="article">
<meta property="og:title" content="WebApp--基础搭建">
<meta property="og:url" content="http://yoursite.com/blog/2018/08/06/WebApp/WebApp--基础搭建/index.html">
<meta property="og:site_name" content="凌浩雨_博客">
<meta property="og:description" content="主页面设置12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010">
<meta property="og:locale" content="default">
<meta property="og:updated_time" content="2018-08-06T10:57:40.822Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="WebApp--基础搭建">
<meta name="twitter:description" content="主页面设置12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/blog/',
    scheme: 'Pisces',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: 'Author'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/blog/2018/08/06/WebApp/WebApp--基础搭建/"/>





  <title>WebApp--基础搭建 | 凌浩雨_博客</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="default">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/blog/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">凌浩雨_博客</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle"></p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/blog/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            Home
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/blog/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            Archives
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/blog/blog/2018/08/06/WebApp/WebApp--基础搭建/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="凌浩雨">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/images/avatar.jpeg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="凌浩雨_博客">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">WebApp--基础搭建</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">Posted on</span>
              
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2018-08-06T18:01:39+08:00">
                2018-08-06
              </time>
            

            

            
          </span>

          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <ol>
<li>主页面设置<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br></pre></td><td class="code"><pre><span class="line">&lt;!DOCTYPE html&gt;</span><br><span class="line">&lt;html&gt;</span><br><span class="line"></span><br><span class="line">	&lt;head&gt;</span><br><span class="line">		&lt;title&gt;Test&lt;/title&gt;</span><br><span class="line">		</span><br><span class="line">		&lt;!--设置浏览器编码类型--&gt;</span><br><span class="line">		&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=UTF-8&quot; /&gt;</span><br><span class="line">		&lt;meta http-equiv=&quot;content-type&quot; content=&quot;application/xhtml+xml;charset=UTF-8&quot; /&gt;</span><br><span class="line">				</span><br><span class="line">		&lt;!--清楚浏览器缓存--&gt;</span><br><span class="line">		&lt;meta http-equiv=&quot;Pragma&quot; content=&quot;no-cache&quot; /&gt;</span><br><span class="line">		&lt;meta http-equiv=&quot;Cache-Control&quot; content=&quot;no-cache, must-revalidate&quot; /&gt;</span><br><span class="line">		&lt;meta http-equiv=&quot;expires&quot; content=&quot;Wed, 26 Feb 1997 08:21:57 GMT&quot; /&gt;</span><br><span class="line">		</span><br><span class="line">		&lt;!--禁止浏览器缩放--&gt;</span><br><span class="line">		&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no&quot;&gt;</span><br><span class="line">		&lt;!--iPhone手机上设置手机号码不被显示为拨号链接--&gt;</span><br><span class="line">		&lt;meta content=&quot;telephone=no, address=no&quot; name=&quot;format-detection&quot; /&gt;</span><br><span class="line">		&lt;!--ios私有属性，可以添加到主屏幕--&gt;</span><br><span class="line">		&lt;meta name=&quot;apple-mobile-web-app-capable&quot; content=&quot;yes&quot; /&gt;</span><br><span class="line">		&lt;!--ios私有属性，网站开启对web app的支持--&gt;</span><br><span class="line">		&lt;meta name=&quot;apple-mobile-web-app-status-bar-style&quot; content=&quot;black-translucent&quot; /&gt;</span><br><span class="line">		&lt;meta name=&quot;layoutmode&quot; content=&quot;standard&quot; /&gt;</span><br><span class="line">		&lt;meta name=&quot;renderer&quot; content=&quot;webkit&quot; /&gt;</span><br><span class="line">		&lt;!--uc浏览器判断到页面上文字居多时，会自动放大字体优化移动用户体验。添加以下头部可以禁用掉该优化--&gt;</span><br><span class="line">		&lt;meta name=&quot;wap-font-scale&quot; content=&quot;no&quot;&gt;</span><br><span class="line">		&lt;meta content=&quot;telephone=no&quot; name=&quot;format-detection&quot; /&gt;</span><br><span class="line"></span><br><span class="line">		</span><br><span class="line">		&lt;!--让IE8，IE9，支持Html5和Css3--&gt;</span><br><span class="line">		&lt;!--[if lte IE 8]&gt;</span><br><span class="line">	        &lt;script src=&quot;scripts/selectivizr.js&quot;&gt;&lt;/script&gt;</span><br><span class="line">	    &lt;![endif]--&gt;</span><br><span class="line">		&lt;!--让IE9一下的浏览器支持Html5标签和媒体查询器（主要用于响应式网站开发）--&gt;</span><br><span class="line">		&lt;!--[if lt IE 9]&gt;</span><br><span class="line">	        &lt;script src=&quot;scripts/css3-mediaqueries.js&quot;&gt;&lt;/script&gt;</span><br><span class="line">	        &lt;script src=&quot;scripts/html5shiv.js&quot;&gt;&lt;/script&gt;</span><br><span class="line">	    &lt;![endif]--&gt;</span><br><span class="line">		&lt;!-- 重置样式 --&gt;</span><br><span class="line">		&lt;link type=&quot;text/css&quot; href=&quot;css/reset.css&quot; rel=&quot;stylesheet&quot; /&gt;</span><br><span class="line">		&lt;!-- 主样式 --&gt;</span><br><span class="line">		&lt;link type=&quot;text/css&quot; href=&quot;css/common.css&quot; rel=&quot;stylesheet&quot; /&gt;</span><br><span class="line">		&lt;!-- Jquery库 --&gt;</span><br><span class="line">		&lt;!--&lt;script type=&quot;text/javascript&quot; src=&quot;scripts/jquery-1.11.1.min.js&quot;&gt;&lt;/script&gt;--&gt;</span><br><span class="line">		&lt;!-- 手机触摸 --&gt;</span><br><span class="line">		&lt;!--&lt;script type=&quot;text/javascript&quot; src=&quot;scripts/hammer.js&quot;&gt;&lt;/script&gt;--&gt;</span><br><span class="line"></span><br><span class="line">		&lt;style&gt;</span><br><span class="line">			header &#123;</span><br><span class="line">				background-color: black;</span><br><span class="line">				color: white;</span><br><span class="line">				text-align: center;</span><br><span class="line">				padding: 0px;</span><br><span class="line">/*				padding: 5px;*/</span><br><span class="line">			&#125;</span><br><span class="line">			</span><br><span class="line">			nav &#123;</span><br><span class="line">				line-height: 30px;</span><br><span class="line">				background-color: #eeeeee;</span><br><span class="line">				height: 300px;</span><br><span class="line">				width: 100px;</span><br><span class="line">				float: left;</span><br><span class="line">				padding: 0px;</span><br><span class="line">				/*padding: 5px;*/</span><br><span class="line">			&#125;</span><br><span class="line">			</span><br><span class="line">			section &#123;</span><br><span class="line">				width: 350px;</span><br><span class="line">				float: left;</span><br><span class="line">				padding: 0px;</span><br><span class="line">				/*padding: 10px;*/</span><br><span class="line">			&#125;</span><br><span class="line">			</span><br><span class="line">			footer &#123;</span><br><span class="line">				background-color: black;</span><br><span class="line">				color: white;</span><br><span class="line">				clear: both;</span><br><span class="line">				text-align: center;</span><br><span class="line">				padding: 0px;</span><br><span class="line">				/*padding: 5px;*/</span><br><span class="line">			&#125;</span><br><span class="line">		&lt;/style&gt;</span><br><span class="line">	&lt;/head&gt;</span><br><span class="line"></span><br><span class="line">	&lt;body&gt;</span><br><span class="line"></span><br><span class="line">		&lt;header&gt;</span><br><span class="line">			&lt;h1&gt;City Gallery&lt;/h1&gt;</span><br><span class="line">		&lt;/header&gt;</span><br><span class="line"></span><br><span class="line">		&lt;nav&gt;</span><br><span class="line">			London&lt;br&gt; </span><br><span class="line">			Paris&lt;br&gt;</span><br><span class="line">			Tokyo&lt;br&gt;</span><br><span class="line">		&lt;/nav&gt;</span><br><span class="line"></span><br><span class="line">		&lt;section&gt;</span><br><span class="line">			&lt;h1&gt;London&lt;/h1&gt;</span><br><span class="line">			&lt;p&gt;</span><br><span class="line">				London is the capital city of England. It is the most populous city in the United Kingdom, with a metropolitan area of over 13 million inhabitants.</span><br><span class="line">			&lt;/p&gt;</span><br><span class="line">			&lt;p&gt;</span><br><span class="line">				Standing on the River Thames, London has been a major settlement for two millennia, its history going back to its founding by the Romans, who named it Londinium.</span><br><span class="line">			&lt;/p&gt;</span><br><span class="line">		&lt;/section&gt;</span><br><span class="line"></span><br><span class="line">		&lt;footer&gt;</span><br><span class="line">			Copyright W3School.com.cn</span><br><span class="line">		&lt;/footer&gt;</span><br><span class="line"></span><br><span class="line">	&lt;/body&gt;</span><br><span class="line"></span><br><span class="line">&lt;/html&gt;</span><br></pre></td></tr></table></figure>
</li>
</ol>
<a id="more"></a>
<ol start="2">
<li><p>引用的common.css文件</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br><span class="line">198</span><br><span class="line">199</span><br><span class="line">200</span><br><span class="line">201</span><br><span class="line">202</span><br><span class="line">203</span><br><span class="line">204</span><br><span class="line">205</span><br><span class="line">206</span><br><span class="line">207</span><br><span class="line">208</span><br><span class="line">209</span><br><span class="line">210</span><br><span class="line">211</span><br><span class="line">212</span><br><span class="line">213</span><br><span class="line">214</span><br><span class="line">215</span><br><span class="line">216</span><br><span class="line">217</span><br><span class="line">218</span><br><span class="line">219</span><br><span class="line">220</span><br><span class="line">221</span><br><span class="line">222</span><br><span class="line">223</span><br><span class="line">224</span><br><span class="line">225</span><br><span class="line">226</span><br><span class="line">227</span><br><span class="line">228</span><br><span class="line">229</span><br><span class="line">230</span><br><span class="line">231</span><br></pre></td><td class="code"><pre><span class="line">/* 禁用iPhone中Safari的字号自动调整 */</span><br><span class="line"></span><br><span class="line">html &#123;</span><br><span class="line">	-webkit-text-size-adjust: none;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">/* 设置HTML5元素为块 */</span><br><span class="line"></span><br><span class="line">article,</span><br><span class="line">aside,</span><br><span class="line">details,</span><br><span class="line">figcaption,</span><br><span class="line">figure,</span><br><span class="line">footer,</span><br><span class="line">header,</span><br><span class="line">hgroup,</span><br><span class="line">menu,</span><br><span class="line">nav,</span><br><span class="line">section &#123;</span><br><span class="line">	display: block;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">/* 设置图片视频等自适应调整 */</span><br><span class="line"></span><br><span class="line">img &#123;</span><br><span class="line">	max-width: 100%;</span><br><span class="line">	height: auto;</span><br><span class="line">	width: auto9;</span><br><span class="line">	/* ie8 */</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">.video embed,</span><br><span class="line">.video object,</span><br><span class="line">.video iframe &#123;</span><br><span class="line">	width: 100%;</span><br><span class="line">	height: auto;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">body &#123;</span><br><span class="line">	font: 14px/22px &quot;Georgia&quot;, Helvetica, Arial, sans-serif;</span><br><span class="line">	background: #fff;</span><br><span class="line">	color: #595959;</span><br><span class="line">	overflow-y: scroll;</span><br><span class="line">	overflow-x: hidden;</span><br><span class="line">	*overflow-y: auto !important;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">a &#123;</span><br><span class="line">	text-decoration: none;</span><br><span class="line">	cursor: pointer;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">.Wrapper &#123;</span><br><span class="line">	width: 100%;</span><br><span class="line">	padding: 0;</span><br><span class="line">	margin: 0;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">li &#123;</span><br><span class="line">	list-style: none;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">a &#123;</span><br><span class="line">	text-decoration: none;</span><br><span class="line">	color: #555756;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">a:hover &#123;</span><br><span class="line">	color: #141414;</span><br><span class="line">	text-decoration: none;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">a img &#123;</span><br><span class="line">	border: none;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">a&gt;img &#123;</span><br><span class="line">	vertical-align: bottom;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">.min-height &#123;</span><br><span class="line">	min-height: 0;</span><br><span class="line">	height: auto;</span><br><span class="line">	_height: 0;</span><br><span class="line">	overflow: hidden;</span><br><span class="line">	_overflow: visible;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">.position-absolute &#123;</span><br><span class="line">	position: absolute;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">.position-relative &#123;</span><br><span class="line">	position: relative;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">.overflow-hidden &#123;</span><br><span class="line">	overflow: hidden;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">/*</span><br><span class="line"> * -----------------------------------------</span><br><span class="line"> *  320 ~ 480</span><br><span class="line"> * -----------------------------------------</span><br><span class="line"> */</span><br><span class="line"></span><br><span class="line">@media only screen and (min-width: 320px) and (max-width: 480px) &#123;&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">/*</span><br><span class="line"> * -----------------------------------------</span><br><span class="line"> *  321 ~   宽大于321的设备</span><br><span class="line"> * -----------------------------------------</span><br><span class="line"> */</span><br><span class="line"></span><br><span class="line">@media only screen and (min-width: 321px) &#123;&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">/*</span><br><span class="line"> * -----------------------------------------</span><br><span class="line"> *  ~ 320  宽小于320的设备</span><br><span class="line"> * -----------------------------------------</span><br><span class="line"> */</span><br><span class="line"></span><br><span class="line">@media only screen and (max-width: 320px) &#123;&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">/*</span><br><span class="line"> * -----------------------------------------</span><br><span class="line"> *  ~ 480  宽小于480的设备</span><br><span class="line"> * -----------------------------------------</span><br><span class="line"> */</span><br><span class="line"></span><br><span class="line">@media only screen and (max-width: 480px) &#123;&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">/* medium screens (excludes iPad &amp; iPhone) */</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">/*</span><br><span class="line"> * -----------------------------------------</span><br><span class="line"> * 481 ~ 767  宽大于480且小于767的iPad和iPhone</span><br><span class="line"> * -----------------------------------------</span><br><span class="line"> */</span><br><span class="line"></span><br><span class="line">@media only screen and (min-width: 481px) and (max-width: 767px) &#123;&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">/* ipads (portrait and landscape) */</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">/*</span><br><span class="line"> * -----------------------------------------</span><br><span class="line"> * 768 ~ 1024  宽大于480且小于1024的iPad和iPhone</span><br><span class="line"> * -----------------------------------------</span><br><span class="line"> */</span><br><span class="line"></span><br><span class="line">@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) &#123;&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">/* ipads (landscape) */</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">/*</span><br><span class="line"> * -----------------------------------------</span><br><span class="line"> * 768 ~ 1024  宽大于480且小于1024的iPad和iPhone</span><br><span class="line"> * -----------------------------------------</span><br><span class="line"> */</span><br><span class="line"></span><br><span class="line">@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) &#123;&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">/* ipads (portrait) */</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">/*</span><br><span class="line"> * -----------------------------------------</span><br><span class="line"> * 768 ~ 1024  宽大于480且小于1024的iPad和iPhone</span><br><span class="line"> * -----------------------------------------</span><br><span class="line"> */</span><br><span class="line"></span><br><span class="line">@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait) &#123;&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">/*</span><br><span class="line"> * -----------------------------------------</span><br><span class="line"> * 1444 ~ 1824  宽大于1444且小于1824的设备</span><br><span class="line"> * -----------------------------------------</span><br><span class="line"> */</span><br><span class="line"></span><br><span class="line">@media only screen and (min-width: 1444px) and (max-width: 1824px) &#123;&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">/*</span><br><span class="line"> * -----------------------------------------</span><br><span class="line"> * 1824 ~  宽大于1824的设备</span><br><span class="line"> * -----------------------------------------</span><br><span class="line"> */</span><br><span class="line"></span><br><span class="line">@media only screen and (min-width: 1824px) &#123;&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">/*</span><br><span class="line"> * -----------------------------------------</span><br><span class="line"> * 2224 ~  宽大于2224的设备</span><br><span class="line"> * -----------------------------------------</span><br><span class="line"> */</span><br><span class="line"></span><br><span class="line">@media only screen and (min-width: 2224px) &#123;&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">/* iphone 4 and high pixel ratio (1.5+) devices */</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">/*</span><br><span class="line"> * -----------------------------------------</span><br><span class="line"> * iphone4 ~</span><br><span class="line"> * -----------------------------------------</span><br><span class="line"> */</span><br><span class="line"></span><br><span class="line">@media only screen and (-webkit-min-device-pixel-ratio: 1.5),</span><br><span class="line">only screen and (min-device-pixel-ratio: 1.5) &#123;&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">/* iphone 4 and higher pixel ratio (2+) devices (retina) */</span><br><span class="line"></span><br><span class="line">@media only screen and (-webkit-min-device-pixel-ratio: 2),</span><br><span class="line">only screen and (min-device-pixel-ratio: 2) &#123;&#125;</span><br></pre></td></tr></table></figure>
</li>
<li><p>引用的reset.css文件</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br></pre></td><td class="code"><pre><span class="line">html,</span><br><span class="line">body,</span><br><span class="line">div,</span><br><span class="line">span,</span><br><span class="line">applet,</span><br><span class="line">object,</span><br><span class="line">iframe,</span><br><span class="line">h1,</span><br><span class="line">h2,</span><br><span class="line">h3,</span><br><span class="line">h4,</span><br><span class="line">h5,</span><br><span class="line">h6,</span><br><span class="line">p,</span><br><span class="line">blockquote,</span><br><span class="line">pre,</span><br><span class="line">a,</span><br><span class="line">abbr,</span><br><span class="line">acronym,</span><br><span class="line">address,</span><br><span class="line">big,</span><br><span class="line">cite,</span><br><span class="line">code,</span><br><span class="line">del,</span><br><span class="line">dfn,</span><br><span class="line">em,</span><br><span class="line">font,</span><br><span class="line">img,</span><br><span class="line">ins,</span><br><span class="line">kbd,</span><br><span class="line">q,</span><br><span class="line">s,</span><br><span class="line">samp,</span><br><span class="line">small,</span><br><span class="line">strike,</span><br><span class="line">strong,</span><br><span class="line">sub,</span><br><span class="line">sup,</span><br><span class="line">tt,</span><br><span class="line">var,</span><br><span class="line">b,</span><br><span class="line">u,</span><br><span class="line">i,</span><br><span class="line">center,</span><br><span class="line">dl,</span><br><span class="line">dt,</span><br><span class="line">dd,</span><br><span class="line">ol,</span><br><span class="line">ul,</span><br><span class="line">li,</span><br><span class="line">fieldset,</span><br><span class="line">form,</span><br><span class="line">label,</span><br><span class="line">legend,</span><br><span class="line">table,</span><br><span class="line">caption,</span><br><span class="line">tbody,</span><br><span class="line">tfoot,</span><br><span class="line">thead,</span><br><span class="line">tr,</span><br><span class="line">th,</span><br><span class="line">td &#123;</span><br><span class="line">	margin: 0;</span><br><span class="line">	padding: 0;</span><br><span class="line">	border: 0;</span><br><span class="line">	outline: 0;</span><br><span class="line">	font-size: 100%;</span><br><span class="line">	vertical-align: baseline;</span><br><span class="line">	background: transparent;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">body &#123;</span><br><span class="line">	line-height: 1;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">ol,</span><br><span class="line">ul &#123;</span><br><span class="line">	list-style: none;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">blockquote,</span><br><span class="line">q &#123;</span><br><span class="line">	quotes: none;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">blockquote:before,</span><br><span class="line">blockquote:after,</span><br><span class="line">q:before,</span><br><span class="line">q:after &#123;</span><br><span class="line">	content: &apos;&apos;;</span><br><span class="line">	content: none;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">/* remember to define focus styles! */</span><br><span class="line"></span><br><span class="line">:focus &#123;</span><br><span class="line">	outline: 0;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">/* remember to highlight inserts somehow! */</span><br><span class="line"></span><br><span class="line">ins &#123;</span><br><span class="line">	text-decoration: none;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">del &#123;</span><br><span class="line">	text-decoration: line-through;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">/* tables still need &apos;cellspacing=&quot;0&quot;&apos; in the markup */</span><br><span class="line"></span><br><span class="line">table &#123;</span><br><span class="line">	border-collapse: collapse;</span><br><span class="line">	border-spacing: 0;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</li>
</ol>
<p><strong>注意: 在css样式中为根节点设置属性时，padding表现出margin的效果，而margin表现出padding的修改。</strong></p>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/blog/2018/08/06/Vue/Vue2+VueRouter2+webpack-构建项目/" rel="next" title="Vue2+VueRouter2+webpack-构建项目">
                <i class="fa fa-chevron-left"></i> Vue2+VueRouter2+webpack-构建项目
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/blog/2018/08/06/WeChat/小程序环境搭建/" rel="prev" title="小程序环境搭建">
                小程序环境搭建 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      

      <section class="site-overview-wrap sidebar-panel sidebar-panel-active">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="/blog/images/avatar.jpeg"
                alt="凌浩雨" />
            
              <p class="site-author-name" itemprop="name">凌浩雨</p>
              <p class="site-description motion-element" itemprop="description">专业从事于移动端开发，Android与iOS均有涉及，主做Android开发与React Native开发</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/blog/archives/">
              
                  <span class="site-state-item-count">393</span>
                  <span class="site-state-item-name">posts</span>
                </a>
              </div>
            

            

            

          </nav>

          

          

          
          

          
          

          

        </div>
      </section>

      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2018</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">凌浩雨</span>

  
</div>


  <div class="powered-by">Powered by <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a></div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">Theme &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Pisces</a> v5.1.4</div>




        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/blog/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/blog/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/blog/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/blog/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/blog/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/blog/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/blog/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/blog/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  





  

  

  

  
  

  

  

  

</body>
</html>
